package ch.uzh.ifi.sopra.gruppe9.rmi_test;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class Game extends UnicastRemoteObject implements IGame {

	private static final long serialVersionUID = 3421032720040265666L;
	
	private Player playerOne;
	
	private Player playerTwo;

	public Game() throws RemoteException {
		playerOne = new Player(this);
		playerTwo = new Player(this);
	}

	public Player getPlayerOne() {
		return playerOne;
	}

	public Player getPlayerTwo() {
		return playerTwo;
	}
	
	public boolean isReady() throws RemoteException {
		return (playerOne.isReady() && playerTwo.isReady());
	}
}
